$(function(){

    $('.ym-date').val(moment().format("YYYY-MM"));
    $('.ym-date').datetimepicker({
        language:  'zh-CN',
        format: 'yyyy-mm',
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 3,
        minView:3,
    });
    $('.ymd-date').val(moment().format("YYYY-MM-DD"));
    $('.ymd-date').datetimepicker({
        language:  'zh-CN',
        format: 'yyyy-mm-dd',
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView:2,
    });

	//弹窗显示
    $(document).on("click",".hdmanage-table td input",function(){
    	$("[formTo='hd_process']").show();
    })

    //提示弹窗
    $(document).on("click",".tip-btn",function(){
        var $this = $(this),
            tipStyle = $this.attr("tip"),
            btnid = $this.attr("id");

        /*显示成功弹窗*/  
        if (tipStyle=="success" && checkWTip(this)){
            if ($this.hasClass("submit-hid")) {

                addTipHtml(
                    "success", 
                    "隐患处理申请提交成功！",
                    "",
                    "确定",
                    "green",
                    function(){
                        closeWindow();
                        window.history.go(0);
                    }
                );
            }
        }
        
    });
        
})

